import { XrequestInstance } from "@/utils/request"
import { IListType, IUser, IDepartment, IRole, IMenu } from "../type"

export function getAllUser(data) {
  return XrequestInstance.request<IListType<IUser[]>>({
    url: "/alluser",
    method: "post",
    data
  })
}

export function getAllDepartment(data) {
  return XrequestInstance.request<IListType<IDepartment>>({
    url: "/alldepartment",
    method: "post",
    data
  })
}

export function getAllRole(data) {
  return XrequestInstance.request<IListType<IRole>>({
    url: "/allrole",
    method: "post",
    data
  })
}
export function getAllMenu(data) {
  return XrequestInstance.request<IListType<IMenu>>({
    url: "/allmenu",
    method: "post",
    data
  })
}
